package com.ego.common.constant;

/**
 * @program: ego
 * @description: 仓库常量及枚举
 * @author: KamTang
 * @create: 2022-11-24 10:55
 **/
public class WareConstant {
    public enum PurchaseStatusEnum {
        /**
         * CREATED - 新建
         * ASSIGNED - 已分配
         * RECEIVED - 已领取
         * FINISHED - 已完成
         * ERROR - 有异常
         */
        CREATED(0, "新建"),
        ASSIGNED(1, "已分配"),
        RECEIVED(2, "已领取"),
        FINISHED(3, "已完成"),
        ERROR(4, "有异常");

        private final Integer code;
        private final String msg;

        PurchaseStatusEnum(Integer code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public Integer getCode() {
            return code;
        }


        public String getMsg() {
            return msg;
        }

    }

    public enum PurchaseDetailStatusEnum {
        /**
         * CREATED - 新建
         * ASSIGNED - 已分配
         * BUYING - 正在采购
         * FINISHED - 已完成
         * ERROR - 采购失败
         */
        CREATED(0, "新建"),
        ASSIGNED(1, "已分配"),
        BUYING(2, "正在采购"),
        FINISHED(3, "已完成"),
        ERROR(4, "采购失败");

        private final int code;
        private final String msg;

        PurchaseDetailStatusEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }


        public String getMsg() {
            return msg;
        }

    }

    public enum WareOrderTaskLockStatusEnum {
        /**
         * LOCKED - 锁定成功
         * UNLOCK - 解锁
         * DEDUCT - 扣减
         */
        LOCKED(1, "锁定成功"),
        UNLOCK(2, "已解锁"),
        DEDUCT(3, "扣减");

        private final int code;
        private final String msg;

        WareOrderTaskLockStatusEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }


        public String getMsg() {
            return msg;
        }

    }
}
